package io;

import java.io.FileOutputStream;
import java.io.IOException;
import java.io.ObjectOutputStream;

public class OOSDemo1 {
    public static void main(String[] args) throws IOException {
        String[] other = {"唱","跳","rap"};
        Student1 stu = new Student1("帅哥",22,"男",other);
        FileOutputStream fos = new FileOutputStream("001.txt");
        ObjectOutputStream oos = new ObjectOutputStream(fos);
        oos.writeObject(stu);
        System.out.println("写出完毕");
        oos.close();
    }
}
